#coding=utf-8

#登录页面
class loginPage():
    #底部控件
    def __init__(self,driver):
        self.driver = driver
    def userName(self):
        return self.driver.find_element_by_name("UserCode")
    def pwdWord(self):
        return self.driver.find_element_by_name("password_PWD")
    def orgCode(self,):
        return self.driver.find_element_by_name("StationCode")
    def submit(self):
        return self.driver.find_element_by_name("submit2")


    # driver.switch_to.frame("fraInterface")
    # workbook = xlrd.open_workbook("GLprice.xlsm")  # 获取excel数据
    # worksheet = workbook.sheet_by_name("mapping")
    # nrows = worksheet.nrows  # 获取excel行数
    # # ncols = worksheet.ncols
    # # for i in range(2,nrows):   #循环行数据
    # # rows = worksheet.row_values(i)  #读取行数据
    # driver.find_element_by_name("UserCode").send_keys(worksheet.cell(5, 1).value)  # 传参，用户名
    # driver.find_element_by_name("password_PWD").send_keys(worksheet.cell(6, 1).value)  # 传参，密码
    # driver.find_element_by_name("StationCode").click()
    # time.sleep(2)
    # driver.find_element_by_xpath(worksheet.cell(8, 1).value).click()  # 传参，机构
    # driver.find_element_by_name("submit2").click()